<!-- File: /app/View/Clientes/index.ctp -->
<?php
$this->Html->addCrumb('Clientes');
?>
<?php echo $this->Html->link('Agregar Cliente', array('controller' => 'clientes', 'action' => 'add')); ?>
<table>
	<tr>
        <th>Id</th>
        <th>Nombre</th>
                <th>Action</th>
        <th>Created</th>
    </tr>
    <!-- Here is where we loop through our $clientes array, printing out cliente info -->

    <?php foreach ($clientes as $cliente): ?>
    <tr>
        <td><?php echo $cliente['Cliente']['id']; ?></td>
        <td>
            <?php echo $this->Html->link($cliente['Cliente']['nombre'],
array('controller' => 'clientes', 'action' => 'view', $cliente['Cliente']['id'])); ?>
        </td>
    <td>
            <?php echo $this->Form->postLink(
                'Delete',
                array('action' => 'delete', $cliente['Cliente']['id']),
                array('confirm' => 'Are you sure?'));
            ?>
            <?php echo $this->Html->link('Edit', array('action' => 'edit', $cliente['Cliente']['id'])); ?>
        </td>
        <td><?php echo $cliente['Cliente']['created']; ?></td>
    </tr>
    <?php endforeach; ?>
    <?php unset($cliente); ?>
</table>